<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="/weixi/Public/css/bootstrap.min.css">
    <link rel="stylesheet" href="/weixi/Public/css/nivo-slider.css" type="text/css">
    <link rel="stylesheet" href="/weixi/Public/css/themes/bar/bar.css" type="text/css">
    <link rel="stylesheet" href="/weixi/Public/css/themes/dark/dark.css" type="text/css">
    <link rel="stylesheet" href="/weixi/Public/css/themes/default/default.css" type="text/css">
    <link rel="stylesheet" href="/weixi/Public/css/themes/light/light.css" type="text/css">
    <title>商城主页</title>
    <style>
        *{
            box-sizing: border-box;     /*从IE8开始兼容*/
            text-size-adjust:none;
        }
        img{
            max-width: 100%;
        }
        ul,li{
            list-style: none;margin: 0;padding:0;
        }
        html,body, .container{
            height:100%;margin:0;padding:0;
        }
        .container{
            max-width: 640px;min-width: 320px;margin: auto;
        }
        /*header{*/
            /*height:8%; display:flex;background: #3f3f3f;width: 100%;color: white;font-size: 20px;*/
        /*}*/
        /*header>div{*/
            /*text-align: center; height: 100%;align-items: center; display:flex;*/
        /*}*/
        section{
            height:92%;width: 100%;overflow: scroll;
        }
        .section-header{
            height:8%;background: #ff8724;display:flex;
        }
        .nivoSlider img{
            width: 100%;
        }
        .clear{
            clear:both;
        }
        footer{
            height:8%; width: 100%;display:flex;background: #d5d5d5;
        }

    </style>
    <script src="/weixi/Public/js/jquery-1.11.1.min.js"></script>
    <script src="/weixi/Public/js/bootstrap.min.js"></script>
    <script src="/weixi/Public/js/jquery.nivo.slider.js" type="text/javascript" charset="UTF-8" ></script>
    <script type="text/javascript">
        $(function () {
            $(".nivoSlider").nivoSlider();
            $("#return").click(function () {
                window.location.href="../Bike/index.html";
            });
            $("#talk").click(function () {
                $(this).css({background:"white",color:"#5957ff",borderBottom:"2px #5957ff solid" });
                $("#detail").css({ background:" #dbdbdb",color:"black",borderBottom:"0"});
            });
            $("#detail").click(function () {
                $(this).css({background:"white",color:"#5957ff",borderBottom:"2px #5957ff solid" });
                $("#talk").css({ background:" #dbdbdb",color:"black",borderBottom:"0"});
            });
            $("#shouCang").click(function () {
                $(this).css({color:"red"});
                if($(this).css({color:"red"})){
                    $(this).click({color:"#a0a0a0"})
                }
            });
            $("#returns").click(function () {
                window.location.href="../main/index.html";
            })
        })
    </script>
</head>
<body>
<?php if(is_array($name)): foreach($name as $key=>$names): ?><div class="container">
        <section>
            <div class="section-header">
                <div style="width: 15%;height: 100%;display: flex" id="return">
                    <span class="glyphicon glyphicon-chevron-left" style="color: white;display:inline-block;font-size:18px;margin: auto"></span>
                </div>
                <div style="width: 60%;height: 100%;display: flex">
                    <span style="color: white;display:inline-block;font-size:20px;margin: auto">商品详情</span>
                </div>
                <div style="width:25%;height: 100%;display: flex">
                    <span style="color: white;display:inline-block;font-size:20px;margin: auto" class="glyphicon glyphicon-home" id="returns "></span>
                    <span style="color: white;display:inline-block;font-size:20px;margin: auto" class="glyphicon glyphicon-shopping-cart"></span>
                </div>
            </div>
            <div class="section-content" >
                <div>
                    <img src="/weixi/Public/imgs<?php echo ($names["shopimg"]); ?>" >
                    <hr style="border-top: 1px #e2e2e2 solid;padding: 0;margin: 0"/>
                </div>
                <div style="height: 80px;border-bottom: 1px gainsboro solid;margin-top: 10px;display: flex;">
                    <div style="width: 76%;margin-left: 3%">
                        <div style="font-size: 16px"><?php echo ($names["shopname"]); ?></div>
                        <div style="font-size: 20px;color: orangered;margin-right: 10px;">￥<?php echo ($names["price"]); ?></div>
                        <div>销量：14</div>
                    </div>
                    <div style="width: 20%;height: 100%">
                        <div style="display:flex;width: 100%"><span  id="shouCang" class="glyphicon glyphicon-heart-empty" style="font-size: 18px;color: #a0a0a0;display: inline-block;margin: auto"></span></div>
                        <div style="width: 100%;text-align: center;color: gray;">收藏</div>
                    </div>
                </div>
                <div style="min-height:100px;border:1px gainsboro solid">
                    <div style="display: flex">
                        <div style="width: 50%;border-bottom: 2px #5957ff solid;color: #5957ff;font-size: 16px;height: 40px;text-align: center;line-height: 40px" id="detail">商品详情</div>
                        <div style="width: 50%;height: 40px;background: #dbdbdb;font-size: 16px;text-align: center;line-height: 40px;" id="talk" >商品评价</div>
                    </div>
                </div>
            </div>
        </section>
        <footer >
            <div style="width: 50%;height: 100%" >
                <div style="width: 94%;height: 75%;margin: auto;background:orange;border-radius: 5px;margin-top: 3%;display: flex">
                    <a href="<?php echo U('Join/index');?>?id=<?php echo ($names["idit"]); ?>"><span style="color: white;display: inline-block;margin: auto;font-size: 16px">加入购物车</span></a>
                </div>
            </div>
            <div style="width: 50%;height: 100%" >
                <div style="width: 94%;height: 75%;margin: auto;background: #ff3c55;border-radius: 5px;margin-top: 3%;display: flex">
                    <a href="<?php echo U('Join/index');?>?id=<?php echo ($names["idit"]); ?>"><span style="color: white;display: inline-block;margin: auto;font-size: 16px">立即购买</span></a>
                </div>
            </div>
        </footer>
    </div><?php endforeach; endif; ?>
</body>
</html>